package com.zx.platform.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;

import com.zx.platform.dao.model.OperatorInfo;
import com.zx.platform.dao.model.OperatorInfoExample;
import com.zx.platform.dao.model.OperatorRoles;
import com.zx.platform.dao.model.OperatorRolesTemp;

public interface OperatorInfoDao {

	/**
	 * 新增
	 * 
	 * @param OperatorInfo
	 * @return
	 * @throws DataAccessException
	 */
	public String add(OperatorInfo operatorInfo) throws DataAccessException;

	/**
	 * 更新
	 * 
	 * @param OperatorInfo
	 * @return
	 * @throws DataAccessException
	 */
	public String update(OperatorInfo operatorInfo) throws DataAccessException;

	/**
	 * 删除
	 * 
	 * @param OperatorInfo
	 * @throws DataAccessException
	 */
	public void delete(OperatorInfo operatorInfo) throws DataAccessException;

	/**
	 * 分页查询
	 * 
	 * @param pageSize
	 * @param pageBegin
	 * @param example
	 * @return
	 * @throws DataAccessException
	 */
	public List<OperatorInfo> getPageByExample(int pageSize, int pageBegin,
			OperatorInfoExample example) throws DataAccessException;
	/**
	 * 根据Model查找List
	 * @param pageSize
	 * @param pageBegin
	 * @param example
	 * @return
	 * @throws DataAccessException
	 */
	public List<OperatorInfo> getListByExample(OperatorInfoExample example) throws DataAccessException;
	
	/**
	 * 查找条数
	 * 
	 * @param example
	 * @return
	 * @throws DataAccessException
	 */
	public int countByExample(OperatorInfoExample example) throws DataAccessException;
	/**
	 * 根据单Key查找Model
	 * 
	 * @param example
	 * @return
	 * @throws DataAccessException
	 */
	public OperatorInfo selectByPrimaryKey(String key) throws DataAccessException;
	/**
	 * 设置角色
	 */
	public String setOperatorRoles(OperatorRolesTemp model) throws DataAccessException;
	/**
	 * 查找用户角色关联关系
	 */
	public List<OperatorRoles> getOperatorRoles(String operatorId) throws DataAccessException;
}